package Day16.object;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/23 9:41
 */
public class Equals02 {
    public static void main(String[] args) {
        int i = 65;
        float f1 = 65.0f;
        System.out.println("65和65.0是否相等"+(i==f1));


        char ch1 = 'A';
        char ch2 = 12 ;
        System.out.println("65和A是否相等"+(i==ch1));
        System.out.println("12和c2是否相等"+(12==ch2));


        String str1 = new String("hello");
        String str2 = new String("hello");

        System.out.println("str1和str2是否相等"+(str1==str2));
        System.out.println("str1是否和equals str2?"+(str1.equals(str2)));

    }
}
